const QR = require('../../static/utils/qr-create.js');
let SetTimeOn = null;
Page({
  data:{
    canvasHidden:false,//隐藏canvas
    imagePath:false,
    isDbClick:0
  },
  onShow() {
    let that = this;
    that.QRcreate();
  },
  QRcreate(data = {}){
    let that = this;
    data.time = wx.time();
    data.rnd = wx.RndNum();
    var imagePath = QR.createQrCodeImg(JSON.stringify(data), { 'size': 300 });
    that.setData({
       imagePath: imagePath
    });
  },
  UpdateQR(){
    let that = this;
    that.QRcreate();
  }
})
